import Vue from 'vue';
import Router from 'vue-router';

Vue.use(Router);

export default new Router({
    routes: [{
        path: '/home',
        name: 'Home',
        component: resolve => require.ensure([], () => resolve(require('../pages/home/index.vue')), 'home'),
        meta: {
            keepAlive: true
        }
    }, {
        path: '/test/:type',
        name: 'Test',
        component: resolve => require.ensure([], () => resolve(require('../pages/test/index.vue')), 'test'),
        meta: {
            keepAlive: true
        }
    }, {
        path: '/',
        redirect: '/home'
    }]
});